﻿<?php
include_once 'conn_mysql.php';

$lvyou_type=$_REQUEST['lvyou_type']?$_REQUEST['lvyou_type']:1;


$sql="SELECT * FROM `lvyou_difang_info` WHERE difang_type=$lvyou_type and is_open='1'";
$query = mysql_query($sql);
$num=mysql_num_rows($query);
?>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<script language="javascript" src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
<title>驴行天下</title>
<SCRIPT LANGUAGE="javascript"> 
function adaptive(){
	<?php include 'fenxiang_peizhi.php';?>
	
	var wight=document.body.clientWidth;
	document.getElementById("sdfsdf").style.height = 50;
	
	for(i=1;i<=<?php echo $num; ?>;i++){
		document.getElementById("lvxingpicture_0"+String(i)).style.height = (wight/641)*301;
		//document.getElementById("zhouzhao"+String(i)).style.height = (wight/641)*301;
		//document.getElementById("zhouzhao"+String(i)).style.marginTop = -(wight/641)*301;
	}
	
	if(wight>350){
		for(i=1;i<=<?php echo $num; ?>;i++){
			//document.getElementById("wenzhi_"+String(i)).style.marginTop = 105;
		}
	}
	document.getElementById("body").style.display=""
	
	<?php
	$sql="SELECT * FROM `lvyou_difang_info` WHERE difang_type=$lvyou_type";
	$query = mysql_query($sql);
	$num=mysql_num_rows($query);
	?>
	k=1;
	for(i=0;i<<?php echo $num;?>;i++){
		document.getElementById("biaoti"+String(k)).innerHTML=cutstr(document.getElementById("biaoti"+String(k)).innerHTML,27);
		k++;
	}
}
function Zhongxue_GAO_close(){
	document.getElementById("Zhongxue_GAO").style.display = "none";
	document.getElementById("Zhongxue_GAO_BGM").style.display = "none";
}
function Zhongxue_GAO_open(){
	document.getElementById("Zhongxue_GAO").style.display = "";
	document.getElementById("Zhongxue_GAO_BGM").style.display = "";
}


function cutstr(str,len)
{
   var str_length = 0;
   var str_len = 0;
      str_cut = new String();
      str_len = str.length;
      for(var i = 0;i<str_len;i++)
     {
        a = str.charAt(i);
        str_length++;
        if(escape(a).length > 4)
        {
         //中文字符的长度经编码之后大于4
         str_length++;
         }
         str_cut = str_cut.concat(a);
         if(str_length>=len)
         {
         str_cut = str_cut.concat("...");
         return str_cut;
         }
    }
    //如果给定字符串小于指定长度，则返回源字符串；
    if(str_length<len){
     return  str;
    }
}

//国内游 境外游 周边游
</SCRIPT> 

<style>
   a{ text-decoration:none;}
   .chose_a{background-color: #050300; padding:2px;}
</style>
</head>
<body style="margin:0;padding:0;display:none" id="body" onLoad="adaptive()">
	<div style="width:100%;height:0px;background-color:#ff0000;line-height:50px;text-align:center" id="sdfsdf" >
   
    
		<a style="color:#FEFEFE;font-family:微软雅黑;font-size:18px; cursor:pointer; margin-right:15px;"href="lvyou_list.php?lvyou_type=3" <?php if ($lvyou_type==3) { ?>class="chose_a"<?php  } ?> >周边游</a>
        <a style="color:#FEFEFE;font-family:微软雅黑;font-size:18px;text-decoration:none; cursor:pointer; margin-right:15px;" href="lvyou_list.php?lvyou_type=1" <?php if($lvyou_type==1) { ?>class="chose_a"<?php  } ?>>国内游</a>
        <a style="color:#FEFEFE;font-family:微软雅黑;font-size:18px;text-decoration:none; cursor:pointer;" href="lvyou_list.php?lvyou_type=2" <?php if($lvyou_type==2){ ?> class="chose_a"<?php  } ?>>境外游</a>

	</div>

	<?php
	$sql="SELECT * FROM `lvyou_difang_info` WHERE difang_type='$lvyou_type' and is_open='1' order by sort desc";
	$query = mysql_query($sql);
	$i=1;
	if(mysql_num_rows($query)<1){
	?>
		<div style="max-width:640px;;height:300px;line-height:300px;text-align:center">
			<a style="color:#000;font-family:微软雅黑;font-size:18px;">近期暂无线路</a>	
		</div>
	<?php
	}else{
		
	while($row = mysql_fetch_array($query)){
	?>
	<div style="max-width:640px;height:2px;background-image:url(Admin/<?php echo $row['picture_lujing'];?>);margin-top:-1px;background-color:#ffffff;background-repeat:repeat;background-size:cover;padding:1px 0 0 1px;" id="lvxingpicture_0<?php echo $i;?>" onClick="window.location.href='muban_1.php?id_difang=<?php echo $row['id'];?>'">
	</div>
	<div style="max-width:640px;height:55px;text-align:center;padding:0% 3% 0 0%;">
		<a style="float:left;color:#000000;font-family:微软雅黑;font-size:16px;display:block;margin:5px 0 0 5%; " id="biaoti<?php echo $i;?>"><?php echo "【".cut_str($row['banqi1'])."】".$row['biaoti'];?></a>
		<a style="float:right;color:#E04236;font-family:微软雅黑;font-size:15px;margin-right:1%;display:block;margin:5px 0 0 0;">¥<?php echo $row['ertong1'];?></br></a>
		
		<a style="clear:left;float:left;color:#999;font-family:微软雅黑;font-size:14px;margin-left:3%;margin:1px 0 0 5%;">参团游<?php echo $row['jitian'];?>天</a>
		<a style="float:right;color:#999;font-family:微软雅黑;font-size:14px;margin:1px 0 0 0%;">元起</a>
	</div>

	<!--<div style="width:100%;height:2px;background-image:url(picture/zhouzhao.png);margin-top:0px;filter:alpha(opacity=50); opacity:1;background-repeat:repeat;background-size:cover;padding:1px 0 0 0;margin-top:-150.265px;" id="zhouzhao<?php echo $i;?>"  onclick="window.location.href='difang_info.php?id_difang=<?php //echo $row['id'];?>'">
		<div style="float:left;width:60%;height:40px;margin-top:80px;" id="wenzhi_<?php //echo $i;?>"> 
			<a style="float:left;color:#FEFEFE;font-family:微软雅黑;font-size:15px;margin-left:3%;"><?php //echo substr($row['biaoti'],0,60);?></a>	
		</div>
		<div style="float:left;width:40%;height:40px;margin-top:80px;"> 
			<a style="float:right;color:#FEFEFE;font-family:微软雅黑;font-size:15px;margin-right:1%;">¥<?php// echo $row['ertong1'];?>元起</br></a>
			<img style="float:right;width:5.5px;height:10px;margin-right:3%;margin-top:5px" src="picture/jiantou_you.png"></img>
		</div>
		<div style="CLEAR:leftwidth:100%;height:20px;margin-top:7px;"> 
			<a style="float:left;color:#FEFEFE;font-family:微软雅黑;font-size:12px;margin-left:3%;">参团游<?php //echo $row['jitian'];?>天</a>
			<!--<a style="float:right;color:#FEFEFE;font-family:微软雅黑;font-size:12px;margin-right:3%;">返<?php //echo 0;?>元</br></a>
		</div>
	</div>-->
	
	<?php
		$i=$i+1;
	}
	}
	?>
	<!--底部返回首页个人中心菜单-->
	<div style="max-width:640px;height:55px;"></div>
	<div style="box-shadow:0px 0px 2px 0px #bbb;width:100%;height:50px;background-color:#FEFEFE;position:fixed;z-index:998;bottom:0px;">
		<div style="float:left;width:25%;height:50px;" onClick="window.location.href='lvyou_list.php';">
			<img style="float:left;width:30%;height:20px;margin:7px 0 0 44%;" src="picture1/qvnawan_hong.png"></img>
			<a style="clear:left;float:left;color:#E50011;font-family:微软雅黑;font-size:14px;margin:0 0 0 37%;">去哪玩</a>
		</div>
		<div style="float:left;width:25%;height:50px;" onClick="window.location.href='http://haining.365jinbi.com/lxtx/mobile/index.php?m=default&c=index&a=index';">
			<img style="float:left;width:30%;height:20px;margin:7px 0 0 28%;" src="picture1/meihaohuo_hui.png"></img>
			<a style="clear:left;float:left;color:#AAAAAB;font-family:微软雅黑;font-size:14px;margin:0 0 0 21%;">买好货</a>
		</div>
        <div style="float:left;width:25%;height:50px;" onClick="window.location.href='http://haining.365jinbi.com/lxtx/mobile/index.php?m=default&c=travelnote&a=index';">
			<img style="float:left;width:40%;height:20px;margin:7px 0 0 20%;" src="picture1/youji_01.png"></img>
			<a style="clear:left;float:left;color:#AAAAAB;font-family:微软雅黑;font-size:14px;margin:0 0 0 21%;">游记</a>
		</div>
		<div style="float:left;width:25%;height:50px;" onClick="window.location.href='http://haining.365jinbi.com/lxtx/mobile/index.php?m=default&c=user&a=index';">
			<img style="float:left;width:25%;height:20px;margin:7px 0 0 30%;" src="picture1/lvyouhui_hui.png"></img>
			<a style="clear:left;float:left;color:#AAAAAB;font-family:微软雅黑;font-size:14px;margin:0 0 0 21%;">驴游会</a>
		</div>
	</div>
	</body>

<div style="width:100%;height:100%;filter:alpha(opacity=50);opacity:0.50;opacity:0.5;position:absolute;left:0;top:0px;position:fixed;z-index:1;display:none;" id="Zhongxue_GAO_BGM" onClick="Zhongxue_GAO_close();">
</div>
<div style="width:140.7px;height:137.2px;filter:alpha(opacity=50);opacity:0.80;position:absolute;left:50%;top:50px;position:fixed;z-index:998;display:none;margin-left:-70px;background-image:url(picture/liebiao.png);background-repeat:repeat;background-size:cover;"  onclick="Zhongxue_GAO_close();" id="Zhongxue_GAO">
	<div style="width:96%;height:40px;line-height:40px;text-align:center;margin-left:2%;margin-top:12px;border-bottom:1px solid #FFF">
		<a style="color:#FEFEFE;font-family:微软雅黑;font-size:18px;text-decoration:none;" href="lvyou_list.php?lvyou_type=3">周边游</a>
	</div>
	<div style="width:96%;height:40px;line-height:40px;text-align:center;margin-left:2%;border-bottom:1px solid #FFF">
		<a style="color:#FEFEFE;font-family:微软雅黑;font-size:18px;text-decoration:none;" href="lvyou_list.php?lvyou_type=1">国内游</a>
	</div>
	<div style="width:96%;height:40px;line-height:40px;text-align:center;margin-left:2%;">
		<a style="color:#FEFEFE;font-family:微软雅黑;font-size:18px;text-decoration:none;" href="lvyou_list.php?lvyou_type=2">境外游</a>
	</div>
</div>
<?php

?>